#ifndef _PowerControl_h_
#define _PowerControl_h_

#define		FRE_1			1			//
#define		FRE_2			2			//
#define		FRE_3			3			//
#define		FRE_4			4			//
#define		FRE_5			5			//
#define		FRE_6			6			//
#define		FRE_7			7			//
#define		FRE_8			8			//
#define		FRE_9			9			//
#define		FRE_10			10			//
#define		FRE_15			15			//
#define		FRE_20			20			//
#define		FRE_25			25			//
#define		FRE_30			30			//
#define		FRE_40			40			//
#define		FRE_50			50			//
#define		FRE_60			60			//
#define		FRE_60			60			//
#define		FRE_70			70			//
#define		FRE_80			80			
#define		FRE_90			90			
#define		FRE_100			100			//


#define		FRE_120			120			//
#define		FRE_150			150			//
#define		FRE_200			200			//
#define		FRE_250			250			//
#define		FRE_300			300			//
#define		FRE_400			400			//
#define		FRE_500			500			//
#define		FRE_600			600			//
#define		FRE_700			700			//
#define		FRE_800			800			//
#define		FRE_900			900			//
#define		FRE_1000		1000		//
#define		FRE_1500		1500		//
#define		FRE_2000		2000		//




#define		POWER_400		400			//
#define		POWER_500		500			//
#define		POWER_600		600			//
#define		POWER_700		700			//
#define		POWER_800		800			//
#define		POWER_900		900			//
#define		POWER_1000		1000		//
#define		POWER_1100		1100		//
#define		POWER_1200		1200		//
#define		POWER_1300		1300		//
#define		POWER_1400		1400		//
#define		POWER_1500		1500		//

#define		POWER_DIFF_50	50
#define		POWER_DIFF_60	60
#define		POWER_DIFF_70	70
#define		POWER_DIFF_80	80
#define		POWER_DIFF_90	90
#define		POWER_DIFF_100	100
#define		POWER_DIFF_120	120
#define		POWER_DIFF_150	150
#define		POWER_DIFF_180	180
#define		POWER_DIFF_200	200
#define		POWER_DIFF_300	300
#define		POWER_DIFF_400	400
#define		POWER_DIFF_500	500
#define		POWER_DIFF_600	600
#define		POWER_DIFF_700	700
#define		POWER_DIFF_800	800
#define		POWER_DIFF_900	900
#define		POWER_DIFF_1000 1000		
#define		POWER_DIFF_1100 1100
#define		POWER_DIFF_1200 1200
#define		POWER_DIFF_1300 1300
#define		POWER_DIFF_1400 1400
#define		POWER_DIFF_1500 1500
#define		POWER_DIFF_1600 1600
#define		POWER_DIFF_1700 1700
#define		POWER_DIFF_1800 1800
#define		POWER_DIFF_1900 1900
#define		POWER_DIFF_2000 2000


#define		K_Voltage		167
//#define 	 KV0	167
#define		B_Voltage		0
#define		POWER_Voltage_Minus			1
#define		Calculation_Voltage_Offset  			0



#define		K_Current_1		168//	196
#define		K_Current_2		174//	196
#define		K_Current_3		180//	208
//#define 	 KI0	196
#define		POWER_Current_Minus			1
#define		B_Current			86
//#define KB0	20//
#define		Calculation_Current_Offset  			0

	
	
	
/*#define	 Calibration  1 */
void 	Power_CutDown(unsigned int MaxFrequency);
void 	Power_Add(unsigned int MinFrequency);
void PowerControl() ;
//void VoltageCalibration(void);
//void CurrentCalibration(void);
//unsigned long GetCalValue(unsigned long CalData,unsigned int TempK,unsigned int TempC,unsigned char TempCal);
//unsigned long GetCurrentValue();
//void PowerCalculation_Function();
void PowerCalculation_Function(vu16 Kv_slope,vu16 Ki_slope ,vu16 Bv ,vu16 Bi);


extern volatile unsigned int   PWM_F, PWM_F_Back, Lim_Frequ;
extern volatile unsigned long  PWM_SF;
extern volatile unsigned char  Pwm_Freq_Add_Dec_Check;

extern volatile unsigned int  u16_PowerSet,u16_PowerSetBack0,u16_PowerSetBack1;
extern volatile unsigned int  u16_PowerSet_Target_H,u16_PowerSet_Target_L;
//extern volatile unsigned long vu32_PowerSet_H, vu32_PowerSet_L;

#endif

/******************* End of file ***************/